﻿@{
    ViewBag.Title = "Razor Script Compression";
}

@using DB.MVC.Extensions.Compression
@using DB.MVC.Extensions.Compression.Resource


   @*Load definied js framework from config file*@
   @Html.Raw(Html.CompositeScriptResource_DefinedCompositeScriptResource("JSFramework"))
   
   @*load css compressed framework*@
   @Html.Raw(Html.CompositeScriptResource_DefinedCompositeScriptResource("CSSFramework"))

   @*Load new definition compressed resource list*@
   @Html.Raw(Html.CompositeScriptResource_CompositeScript(
           new List<string>() { "~/Scripts/TestScripts/CompressionSwitcher.js" },
           "CompressionSwitch",
                  ResourceType.JS))

   @*script include will be compressed*@
   @Html.Raw(Html.CompositeScriptResource_RenderScriptTag("~/Scripts/TestScripts/TestObject.js"))

    <div>
        Loaded Composite resources successfully
    </div>
    <br />
    <div>
        View the compressed resources by opening Firebug, or resource monitor and view the JS and CSS files downloaded to the client.
    </div>

    <br />
    <div>
        <input type="button" style="width:150px;height:25px;" id="EnableCompression" value="Enable Compression" />
        <br />
        <input type="button" style="width:150px;height:25px;" id="DisableCompression" value="Disable Compression" />
    </div>
    <br />
    <div>
       @{Html.ActionLink("View ASP Version", "Index");}
        
    </div>
